package com.resurvolution.kingcloudmusicspringboot.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.resurvolution.kingcloudmusicspringboot.common.DefaultValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("users")
public class UserEntity {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String email;
    private String nickname;
    @TableField("avatar_url")
    private String avatarUrl;
    @DefaultValue()
    private String gender;
    @TableField("registration_time")
    private LocalDateTime registrationTime;
    @TableField("last_login_time")
    private LocalDateTime lastLoginTime;
    @TableField("premium_member")
    private int premiumMember;
    @TableField("premium_expire_time")
    private LocalDateTime premiumExpireTime;
    private int access;
}
